package com.cn.aam.checaiduo.backend.observer;

import com.cn.aam.checaiduo.base.BaseActivity;
import com.cn.aam.checaiduo.bean.base.BaseResponseB;
import com.cn.aam.checaiduo.widget.WMToast;
import com.orhanobut.logger.Logger;

/**
 * 用于处理无data的返回值
 */
public abstract class OnRequestListener<T extends BaseResponseB> extends BaseObserver<T> {


    public OnRequestListener(BaseActivity baseActivity) {
        super(baseActivity);
    }

    @Override
    public void onNext(T value) {
        Logger.json(value.toJson());
        if (value.getCode() == 0) {
            WMToast.normal("" + value.getMsg());
        }
    }

}
